import React from 'react'
import PropTypes from 'prop-types'

// const ProductsList = ({ title, children }) => (
//   <div>
//     <h3>{title}</h3>
//     <div>{children}</div>
//   </div>
// )

//{title, children} === props
const ProductsList = function (props) {
  //debugger;
  return (
    <div>
      <h3>{props.title}</h3>
      <div>{props.children}</div>
    </div>
  )
}

ProductsList.propTypes = {
  children: PropTypes.node,
  title: PropTypes.string.isRequired
}

export default ProductsList
